package com.towexin.application.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * TODO
 * 用户表实体类
 *
 * @author Towexin
 * @version 1.0
 * @date 2021/4/8 10:54
 */
@Data
@TableName("t_user")
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private static final long serialVersionUID = -5528865992253002688L;

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private String username;        // 用户名 唯一的

    @TableField(insertStrategy = FieldStrategy.NOT_NULL, select = false)
    private String password;        // 用户密码

    @TableField(insertStrategy = FieldStrategy.NOT_NULL, fill = FieldFill.INSERT)
    private String nickname;        // 用户昵称

    @TableField(insertStrategy = FieldStrategy.NOT_NULL, fill = FieldFill.INSERT)
    private Boolean status;         // 用户状态

    @TableField(insertStrategy = FieldStrategy.NOT_NULL, select = false)
    private Integer tryNum;         // 尝试登录次数

    @TableField(insertStrategy = FieldStrategy.NOT_NULL)
    private Boolean online;

    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.NOT_NULL)
    private Date createdTime;

    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
}
